package org.firecloud.h5fun.model.javabean;

import java.util.Date;

/**
 * 应用的对象，与数据库apps表对应
 * @author fc
 *
 */
public class ApplicationBean {
	
	/**
	 * 应用ID
	 */
	private int id;
	/**
	 * 应用基于的项目ID
	 */
	private int projectId;
	/**
	 * 创建应用的用户ID
	 */
	private int userId;
	/**
	 * 应用是否公开
	 */
	private boolean isPublic;
	/**
	 * 应用名
	 */
	private String name;
	/**
	 * 应用介绍内容
	 */
	private String context;
	/**
	 * 应用DIY数据
	 */
	private String data;
	private ProjectBean project;
	private UserBean user;
	/**
	 * 应用点击数
	 */
	private int click;
	/**
	 * 应用评论数
	 */
	private int commentary;
	/**
	 * 应用创建时间
	 */
	private Date createTime;
	
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public int getClick() {
		return click;
	}
	public void setClick(int click) {
		this.click = click;
	}
	public int getCommentary() {
		return commentary;
	}
	public void setCommentary(int commentary) {
		this.commentary = commentary;
	}
	public ProjectBean getProject() {
		return project;
	}
	public void setProject(ProjectBean project) {
		this.project = project;
	}
	public UserBean getUser() {
		return user;
	}
	public void setUser(UserBean user) {
		this.user = user;
	}
	public String getContext() {
		return context;
	}
	public void setContext(String context) {
		this.context = context;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getProjectId() {
		return projectId;
	}
	public void setProjectId(int projectId) {
		this.projectId = projectId;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public boolean isPublic() {
		return isPublic;
	}
	public void setPublic(boolean isPublic) {
		this.isPublic = isPublic;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	@Override
	public String toString() {
		return "ApplictionBean [id=" + id + ", projectId=" + projectId + ", userId=" + userId + ", isPublic=" + isPublic
				+ ", data=" + data + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ApplicationBean other = (ApplicationBean) obj;
		if (id != other.id)
			return false;
		return true;
	}
}
